A distributed system environment includes a number of systems such as, for example, servers providing one or more services, and clients seeking one or more services. The various systems may communicate via a computer network. Coordinating the operations or services between various resources in the distributed system and providing the services at an acceptable performance level is a challenge. ZooKeeper™ from Apache Software Foundation of Forest Hill, Md., is one example of a service that provides a coordination service for distributed applications or distributed systems.
In the ZooKeeper service, when a client requests a connection to a server, the server may forward the connection request to a leader in the ZooKeeper service and the leader may obtain a consensus from the ensemble before forwarding the decision to the server from which the client requested the connection. Upon receiving a consensus or votes from the ensemble, the server allows the client to connect to the ZooKeeper service.
Some coordination services follow a lazy consensus approach in which the consensus is typically not obtained immediately after receiving the request. In the lazy approach, a consensus may be obtained a certain time period after the request is issued. Regardless of how the consensus is obtained, the process of obtaining a consensus is typically performed for most of the transactions requested by the client. For many transactions, obtaining a consensus from the ensemble may not be required. The process of obtaining a consensus from the ensemble consumes a significant amount of time and resources of the coordination service.
In view of the foregoing, it would be useful to provide a coordination service that may at least (i) use the resources more efficiently based on a type of the transaction and (ii) enhance the performance of the service, at least in terms of speed and memory.